package com.util;
/**
 * 
 * 转16进制
 * @author hzy
 *
 */
public class HexUtil {
	public static String chang(byte[] ib){

		String s = new String("");
		char[] Digit = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
		char [] ob = new char[2];

		for (int i = 0; i < ib.length; i++) {
			ob[0] = Digit[(ib[i] >>> 4) & 0X0F];
			ob[1] = Digit[ib[i] & 0X0F];
			s +=  new String(ob);
		}
		return s;

	}
}
